package Chapter05.Cars;

//汽车类
public abstract class MotoVehicle {
    private String brand;//品牌
    private String plate;//车牌
    private String type;//类型
    private int seatnum;//座位
    private int dayrent;//日租金
    private boolean state;//状态

    @Override
    public String toString() {
        return
                type + "\t\t" + brand + "\t\t" + plate + "\t\t" + seatnum + "\t\t" + dayrent + "\t\t\t" + (state?"当前可租":"已租");
    }

    public MotoVehicle(String brand, String plate, String type, int seatnum, int dayrent, boolean state) {
        this.brand = brand;
        this.plate = plate;
        this.type = type;
        this.seatnum = seatnum;
        this.dayrent = dayrent;
        this.state = state;
    }



    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getPlate() {
        return plate;
    }

    public void setPlate(String plate) {
        this.plate = plate;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getSeatnum() {
        return seatnum;
    }

    public void setSeatnum(int seatnum) {
        this.seatnum = seatnum;
    }

    public int getDayrent() {
        return dayrent;
    }

    public void setDayrent(int dayrent) {
        this.dayrent = dayrent;
    }

    public boolean isState() {
        return state;
    }

    public void setState(boolean state) {
        this.state = state;
    }

    //
    public abstract int money(int days);
}
